package cn.tedu.csmall.product.pojo.param;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
public class AlbumAddNewParam implements Serializable {

    @NotNull(message = "相册名称不能为空")
    @ApiModelProperty(value = "相册名称", required = true, example = "测试相册001")// api文档中的描述信息
    private String name;

    @NotNull(message = "相册简介不能为空")
    @ApiModelProperty(value = "相册简介", required = true, example = "测试相册简介001")
    private String description;

    @NotNull(message = "排序序号不能为空")
    @Range(max = 99, message = "排序序号必须在0~99之间")
    @ApiModelProperty(value = "排序序号,必须再0~255之间", required = true, example = "1")
    private Integer sort;
}
